package com.wuming.house.service;

import com.wuming.house.core.BusinessException;
import com.wuming.house.model.Banner;

import java.util.List;

public interface BannerService {

    /**
     * 保存广告
     *
     * @param banner 广告信息
     * @throws BusinessException
     */
    void saveBanner(Banner banner) throws BusinessException;

    /**
     * 修改广告信息
     *
     * @param banner 广告信息
     * @throws BusinessException
     */
    void modifyBanner(Banner banner) throws BusinessException;

    void removeBannerById(Long id) throws BusinessException;

    /**
     * 根据id查询广告信息
     *
     * @param id 广告id
     * @return 广告信息
     * @throws BusinessException
     */
    Banner getBannerById(Long id) throws BusinessException;

    /**
     * 根据类型查询广告信息
     *
     * @param type 类型
     * @return 广告信息
     * @throws BusinessException
     */
    List<Banner> getAllBannerByType(Integer type) throws BusinessException;


    List<Banner> getBannerByPage(int pageIndex, int pageSize) throws BusinessException;

    int getTotal() throws BusinessException;
}
